GHA: run tests on draft PRs#3926
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3926 +/- ##
==========================================
- Coverage 89.98% 89.98% -0.01%
==========================================
Files 904 904
Lines 106891 106891
==========================================
- Hits 96191 96189 -2
- Misses 10700 10702 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
michaelbynum
left a comment
There was a problem hiding this comment.
Nice! I just have one question. Assuming the answer is no, this looks good to me.
| - name: Upload codecov reports | ||
| if: github.repository_owner == 'Pyomo' || github.ref != 'refs/heads/main' | ||
| if: | | ||
| env.PYOMO_WORKFLOW != 'branch' && |
There was a problem hiding this comment.
I don't really know what this is doing. Will this prevent people from running tests on branches on forks?
There was a problem hiding this comment.
Oh, this is just codecov. Never mind.
There was a problem hiding this comment.
Exactly: we were getting weird behavior on codecov when branches from forks (including the main branch on forks), and when the "branches" workflow would upload coverage results. THis logic makes sure that only the Pyomo main branch, as well as any PR builds are uploaded to codecov.
Fixes # .
Summary/Motivation:
We moved to more actively using "Draft" PRs to communicate PR status between PR authors and the Review team. Unfortunately, we previously had GHA skip all tests when the PR was marked either "draft" or "WIP", which beans developers aren't getting build/test information. This PR updates the GHA runners so that tests are run for draft PRs, but not for tests marked "WIP".
As a bonus, this reworks the logic around code coverage: the runners are more standardized now, which also means that branches will get coverage computed on their jobs - but not uploaded to codecov.
Changes proposed in this PR:
[WIP]" PRs (and run tests for draft PRs)Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: